﻿<!DOCTYPE html>
<html>
<head>
    <title>Smartflow-Sharp工作流管理平台</title>
    <link href="../content/login.css" rel="stylesheet" />
    <script src="../content/jquery.min.js"></script>
    <script src="../content/common.js"></script>
    <script type="text/javascript">
        $(function () {
            //用于演示
            $("#btnLogin").click(function () {
                var userName = $.trim($("#userName").val());
                if (userName) {

                    $.ajax({
                        type: 'get',
                        url: '/api/user/' + userName+'/info',
                        success: function (result) {
                            if (!!result) {
                                window.localStorage.setItem('ticket', result)
                                window.location.href = './main.html';
                            } else {
                                alert('登录失败');
                            }
                        }
                    });
                }
            });
        });
    </script>
</head>
<body>
    <div class="login">
        <div class="message">Smartflow-Sharp工作流管理平台</div>
        <div id="darkbannerwrap"></div>
        <form method="post">
            <input name="action" value="login" type="hidden" />
            <input name="username" placeholder="用户名" type="text" value="chengderen" id="userName" />
            <hr class="hr15">
            <input name="password" placeholder="密码可不填" type="password" />
            <hr class="hr15">
            <input value="登录" style="width:100%;" type="button" id="btnLogin" />
            <hr class="hr20">
        </form>
    </div>
</body>
</html>